package com.smart.eight.aspectj.test;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

/**
 * 运用aspectj设置切面
 *
 * @author junrui.wang
 * @create 2019/3/18
 */

@Aspect
public class PreGreetingAspectj {
    @Before("execution(* greetTo(..))") //定义增强和切点
    public void beforeGreeting(){ //增强逻辑
        System.out.println("How are You!");
    }
}
